package com.ruoyi.asset.toilet.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.asset.lamp.domain.bo.LampCommunityCountBo;
import com.ruoyi.asset.lamp.domain.bo.LampTypeBo;
import com.ruoyi.asset.toilet.domain.ToiletMaintenance;
import com.ruoyi.asset.toilet.domain.bo.ToiletMaintenanceBo;
import com.ruoyi.asset.toilet.domain.bo.ToiletStatisticsBo;
import com.ruoyi.asset.toilet.domain.bo.ToiletTypeBo;
import com.ruoyi.asset.toilet.domain.vo.ToiletCommunityCountVo;
import com.ruoyi.asset.toilet.domain.vo.ToiletMaintenanceVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 *  公厕管养
 * @author 12276
 */
public interface ToiletMaintenanceMapper extends BaseMapperPlus<ToiletMaintenanceMapper, ToiletMaintenance, ToiletMaintenanceVo> {

    /**
     * 删除公厕管养
     */
    int logicDeleteToilet(@Param("idsSet") Set<Long> idsSet);

    /**
     *  分页查询公厕管养管理范围
     */
    Page<ToiletMaintenanceVo> selectToilet(IPage<ToiletMaintenanceVo> page, @Param("searchBo") ToiletMaintenanceBo searchBo);

    /**
     * 查询公厕管养管理范围
     */
    List<ToiletMaintenanceVo> exportToilet(@Param("searchBo") ToiletMaintenanceBo searchBo);

    /**
     * 统计首页数据
     * @return
     */
    Integer selectToiletCount();

    List<ToiletTypeBo> selectToiletTypeCount(@Param("community") String community);

    List<ToiletTypeBo> selectByCommunityAndDateCount(@Param("community") String community, @Param("date")String date);

    Integer selectToiletCountByCommunity(@Param("date") String date,@Param("community") String community);

    List<Integer> selectSumDate(@Param("date") String date);
}
